package com.game.server.db.dao;

import java.sql.Types;

import com.game.server.db.Parameter;
import com.game.server.db.ParameterType;
import com.game.server.db.SqlHelper;
import com.game.server.db.entity.Gamelog;

public class GamelogDao {

	
	public static void insertInto(Gamelog log) {
		String sql = "INSERT INTO gamelog (roomNumber,userid,score) VALUES (?,?,?)";
		Parameter p1 = new Parameter(Types.INTEGER, log.getRoomNumber(), ParameterType.Input);
		Parameter p2 = new Parameter(Types.INTEGER, log.getUserid(), ParameterType.Input);
		Parameter p3 = new Parameter(Types.INTEGER, log.getScore(), ParameterType.Input);
		SqlHelper.execute(sql, p1, p2, p3);
	}
}
